package gold.digger;

import gold.utils.InputUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC598 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public int maxCount(int m, int n, int[][] ops) {
            int rowMin = m, colMin = n;
            for (int[] op : ops) {
                rowMin = Math.min(rowMin, op[0]);
                colMin = Math.min(colMin, op[1]);
            }

            return rowMin * colMin;
        }
    }

    public void run() {
        Solution solution = new Solution();
        int[][] arr = InputUtil.toDoubleIntegerArray("[[2,2],[3,3]]");
        System.out.println(solution.maxCount(3, 3, arr));
    }

    public static void main(String[] args) throws Exception {
        LC598 an = new LC598();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
